﻿using QYmall.Core.Common.Emum;
using QYmall.Core.Common.Helper;
using QYmall.Core.Model.Models;
using QYmall.Core.Model.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace QYmall.Core.IServices
{
    /// <summary>
    /// 数据统计接口
    /// </summary>
    public interface IReportOrderService : IBaseService
    {
        /// <summary>
        /// 统计商户销售数量
        /// </summary>
        Task<IEnumerable<ReportTotalDto>> GetMerchantSaleCountAsync(int top, Expression<Func<Orders, bool>> funcWhere,
           WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计商品销售数量
        /// </summary>
        Task<IEnumerable<ReportTotalDto>> GetGoodsSaleCountAsync(int top, Expression<Func<Orders, bool>> funcWhere,
            WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计商品销售分页列表
        /// </summary>
        Task<PaginationList<OrderGoods>> GetGoodsSalePageAsync(int pageSize, int pageIndex, Expression<Func<OrderGoods, bool>> funcWhere,
            string orderBy, WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计订单金额
        /// </summary>
        Task<IEnumerable<ReportTotalDto>> GetOrderAmountCountAsync(int top, Expression<Func<Orders, bool>> funcWhere,
            WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计订单金额分页列表
        /// </summary>
        Task<PaginationList<Orders>> GetOrderAmountPageAsync(int pageSize, int pageIndex, Expression<Func<Orders, bool>> funcWhere,
            string orderBy, WriteRoRead writeAndRead = WriteRoRead.Read);
    }
}
